::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
    -webkit-border-radius: 2px;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb {
    -webkit-border-radius: 10px;
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); 
}

.scrollbars(bg) {
    @ var c1 = color(bg).mul(1); c1.a = 0.8;
    @ var c2 = color(bg).mul(1); c2.a = 0.4;
    ::-webkit-scrollbar-thumb {
        background: @c1; 
    }
    ::-webkit-scrollbar-thumb:window-inactive {
        background: @c2; 
    }        
}
.scrollbars('white');

.bg_color(cls,bg,sec) {
    @ var color = "#"+bg;
    @ sec = sec ? "#"+sec : lighten(color,5);
    
    .@{'cm-s-'+cls} {
        background: @color;
        
         > .teacss-ui,
        .jstree-default.jstree-focused,
        .jstree-default.jstree-focused > ul,
        .teacss-ui .ui-widget-header .ui-state-active,
        .teacss-ui .ui-state-default, 
        .teacss-ui .ui-widget-content .ui-state-default, 
        .teacss-ui .ui-widget-header .ui-state-default,
        .teacss-ui .ui-widget-content
        {
            background: @color;
        }
        
        .teacss-ui .ui-tabs .ui-tabs-nav,
        .teacss-ui .dayside-config-dialog  > .ui-dialog-content > .ui-tabs .ui-tabs-nav
        {
            background: @darken(color,5);
        }
        
        .teacss-ui .ui-widget-header .ui-state-active,
        .teacss-ui .ui-state-default, 
        .teacss-ui .ui-widget-content .ui-state-default, 
        .teacss-ui .ui-widget-header .ui-state-default,
        .teacss-ui .dayside-statusbar
        {
            border-color: @sec;
        }
        .teacss-ui .button-select-panel,
        .teacss-ui .editorPanel-toolbar,
        .teacss-ui .dayside-statusbar {
            background: @sec;
        }
        .ui-splitter { 
            background: @sec !important; 
        }
        .scrollbars(lighten(color,20));
    }
}

.bg_color('base16-dark','151515');
.bg_color('ambiance','202020');
.bg_color('3024-night','090300','100700');
.bg_color('blackboard','0C1021');
.bg_color('cobalt','002240');
.bg_color('erlang-dark','002240');
.bg_color('lesser-dark','262626');
.bg_color('mbo','2C2C2C');
.bg_color('midnight','0F192A');
.bg_color('monokai','272822');
.bg_color('night','0A001F');
.bg_color('paraiso-dark','2F1E2E');
.bg_color('paraiso-light','E7E9DB');
.bg_color('pastel-on-dark','2C2827');
.bg_color('rubyblue','112435');
.bg_color('the-matrix','000000');
.bg_color('tomorrow-night-eighties','000000');
.bg_color('twilight','141414');
.bg_color('vibrant-ink','002240');
.bg_color('xq-dark','0A001F');